package user.zc.vo;

import lombok.Getter;
import lombok.Setter;
import user.zc.config.value.ColumnValue;
import user.zc.config.value.Key;

@Getter
@Setter
public class ColumnDTO extends Key {

    private String type;
    private String comment;
    private Integer len;
    private Integer scale;
    private Boolean isPk ;

    public ColumnDTO(ColumnValue columnValue) {
        this(columnValue.getKey(),columnValue.getType(),columnValue.getComment(),columnValue.getLen(),columnValue.getScale(),columnValue.getIsPk());
    }

    public ColumnDTO(String key, String type, String comment, Integer len, Integer scale, Boolean isPk) {
        super(key);
        this.type = type;
        this.comment = comment;
        this.len = len;
        this.scale = scale;
        this.isPk = isPk;
    }
}
